﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Subplicity.ClassService;

namespace Subplicity.Controllers
{
    public class HomeController : BaseController
    {
        //http://jqueryuihelpers.apphb.com/Docmo/GettingStarted
        // GET: /Home/
        /// <summary>
        /// This gets the current scheule 
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
           
            //// Create Service
            //StaffService.StaffService staffService = new StaffService.StaffService();
            //// Create request
            //StaffService.GetStaffRequest staffRequest = new StaffService.GetStaffRequest();
            //staffRequest.SourceCredentials = new StaffService.SourceCredentials();
            //staffRequest.SourceCredentials.SourceName = sourcename;
            //staffRequest.SourceCredentials.Password = password;
            //staffRequest.SourceCredentials.SiteIDs = siteIDs;
            
            //staffRequest.StaffCredentials = new StaffService.StaffCredentials();
            //staffRequest.StaffCredentials.Username = username;
            //staffRequest.StaffCredentials.Password = userpassword;
            //staffRequest.StaffCredentials.SiteIDs = siteIDs;
            //staffRequest.Fields = new string[] { "ClassInstructor" };
            //staffRequest.XMLDetail = StaffService.XMLDetailLevel.Basic;
            
            //StaffService.GetStaffResult result = staffService.GetStaff(staffRequest);

            //Get Schedule
            //ClassService.ClassService classService = new ClassService.ClassService();
            //ClassService.GetClassesRequest classRequest = new ClassService.GetClassesRequest();
            //classRequest.SourceCredentials = new ClassService.SourceCredentials();
            //classRequest.SourceCredentials.SourceName = sourcename;
            //classRequest.SourceCredentials.Password = password;
            //classRequest.SourceCredentials.SiteIDs = siteIDs;

            //classRequest.StaffIDs = new long[] { me.ID.Value };
            //classRequest.XMLDetail = ClassService.XMLDetailLevel.Full;
            //classRequest.StartDateTime = DateTime.Now.AddDays(-3);
            //classRequest.EndDateTime = DateTime.Now.AddDays(7);
            //classRequest.CurrentPageIndex = 0;
            //classRequest.PageSize = 20;
            //ClassService.GetClassesResult classScheduleResult = classService.GetClasses(classRequest);

           
            ////var model = classScheduleResult.Classes.GroupBy(m => m.Location.Name );
           
            //return View(classScheduleResult.Classes.ToList());
            return View();
        }

       
        public ActionResult GetSchedule()
        {
            return View();
        }
    }
}
